﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Administrator/Views/Shared/admin.master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<CollegeWebsite.Areas.Administrator.Models.Course>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Index</h2>

    <table>
        <tr>
            <th></th>
            <%--<th>
                CourseID
            </th>--%>
            <th>
                DepartmentName
            </th>
            <th>
                CourseName
            </th>
            <th>
                CourseCapicity
            </th>
            <th>
                CourseFee
            </th>
            <th>
                Status
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%= Html.ActionLink("Edit", "Edit", new { id=item.CourseID }) %> |
                <%= Html.ActionLink("Details", "Details", new { id=item.CourseID })%> |
                <%= Html.ActionLink("Delete", "Delete", new { id=item.CourseID })%>
            </td>
            <%--<td>
                <%= Html.Encode(item.CourseID) %>
            </td>--%>
            <td>
                <%= Html.Encode(item.Department.DepartmentName) %>
            </td>
            <td>
                <%= Html.Encode(item.CourseName) %>
            </td>
            <td>
                <%= Html.Encode(item.CourseCapicity) %>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:F}", item.CourseFee)) %>
            </td>
            <td>
                <%= Html.Encode(item.Status) %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%= Html.ActionLink("Create New", "Create") %>
    </p>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="TitleContentPlaceHolder" runat="server">
</asp:Content>

